<h2>Listing Nodes for Community <%= session[:community_name]%> </h2>

<table cellspacing = "10">
  <tr>
    <th>Name</th>
    <th>Gender</th>
    <th>Born On</th>
    <th>Address</th>
  </tr>

<% for node in @nodes %>
  <tr>
    <td><%= node.name %></td>
    <td><%= node.gender %></td>
    <td><%= node.born_on %></td>
    <td><%= node.address %></td>

    <td><%= link_to 'Show', :action => 'show', :id => node %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => node %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @node_pages.current.previous } if @node_pages.current.previous %>
<%= link_to 'Next page', { :page => @node_pages.current.next } if @node_pages.current.next %>

<br />

<%= link_to 'New node', :action => 'new' %>
